/*
 * @lc app=leetcode.cn id=389 lang=javascript
 *
 * [389] 找不同
 */

// @lc code=start
/**
 * @param {string} s
 * @param {string} t
 * @return {character}
 */
var findTheDifference = function(s, t) {
    let sNum = 0
    for (let index = 0; index < s.length; index++) {
        const element = s[index];
        sNum += element.charCodeAt()
    }
    let tNum = 0
    for (let index = 0; index < t.length; index++) {
        const element = t[index];
        tNum += element.charCodeAt()
    }
    let charNum = tNum - sNum
    return String.fromCharCode(charNum)
};
// @lc code=end

